﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Windows;

namespace Eniux.Windows.Input
{
    /// <summary>
    /// 表示 InputGesture 和命令之间的绑定
    /// </summary>
    public class InputBindingX : InputBinding
    {
        #region 注册AssociatedGesture
        /// <summary>
        /// 获取或设置输入手势
        /// </summary>
        public InputGesture AssociatedGesture
        {
            get { return (InputGesture)GetValue(AssociatedGestureProperty); }
            set { SetValue(AssociatedGestureProperty, value); }
        }

        /// <summary>
        /// 输入手势属性
        /// </summary>
        public static readonly DependencyProperty AssociatedGestureProperty =
            DependencyProperty.Register("AssociatedGesture", typeof(InputGesture), typeof(InputBindingX), null);
        #endregion

        #region 重写Gesture
        public override InputGesture Gesture
        {
            get
            {
                return this.AssociatedGesture;
            }
            set
            {
                this.AssociatedGesture = value;
            }
        }
        #endregion
    }
}
